package com.liliudong.cursormate.handler;

import com.baomidou.mybatisplus.extension.plugins.handler.DataPermissionHandler;
import lombok.extern.slf4j.Slf4j;
import net.sf.jsqlparser.expression.Expression;
import org.springframework.stereotype.Component;

/**
 * 数据权限DataPermissionHandler
 *
 * @author liudo
 * @version 1.0
 * @project cursor-mate
 * @date 2023/10/26 18:16:31
 */
@Slf4j
@Component
public class CursorMateDataPermissionHandler implements DataPermissionHandler {
    @Override
    public Expression getSqlSegment(Expression where, String mappedStatementId) {
        log.error("-------------数据权限拦截---------------");
        // 实现SQL数据权限拦截
        return where;
    }
}
